import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    port: 3000,
    proxy: {
      // API代理配置
      '/api': {
        target: 'http://live.example.cn:1985',
        changeOrigin: true,
        rewrite: (path) => path,
        secure: false
      },
      '/api/v1': {
        target: 'http://live.example.cn:1985',
        changeOrigin: true,
        rewrite: (path) => path,
        secure: false
      }
    }
  }
})